<?php
namespace PsiFramework\Applications\AlloMediaPortal\Classes\Model;

import("Classes.Model.Object");
import("Applications.AlloMediaPortal.Classes.Model.AlloMediaEntry");
import("Applications.AlloMediaPortal.Classes.Model.AlloMediaSite");

use \PsiFramework\Classes\Model\Object;
use \PsiFramework\Applications\AlloMediaPortal\Classes\Model\AlloMediaEntry;
use \PsiFramework\Applications\AlloMediaPortal\Classes\Model\AlloMediaSite;

/**
 * AlloMedia
 * Portail des professionnels
 *
 * @author Rémi San
 * @version beta
 */

/**
 * Classe d'une appartenance à un site
 *
 * @package Model
 */
class SiteMembership extends Object
{

    protected /*AlloMediaEntry*/  $_entry ;
    protected /*AlloMediaSite*/   $_site ;
    protected /*int*/             $_siteUserId ;

    public function __construct(
        /*AlloMediaEntry*/ $entry=null,
        /*AlloMediaSite*/ $site=null,
        /*int*/ $siteUserId=null
    )
    {
        $this->_entry = $entry ;
        $this->_site = $site ;
        $this->_siteUserId = $siteUserId ;
    }

    public function getId()
    {
        if (is_null($this->_entry) && is_null($this->_site)) {
        	return null ;
        } else {
            $id = array();
            if (!is_null($this->_entry)) {
            	$id["entry"] = $this->_entry ;
            }
            if (!is_null($this->_site)) {
            	$id["site"] = $this->_site ;
            }
            return $id ;
        }
    }

    public function getEntry()
    {
        return $this->_entry ;
    }

    public function setEntry($entry)
    {
        $this->_entry = $entry;
    }

    public function getSite()
    {
        return $this->_site ;
    }

    public function setSite($site)
    {
        $this->_site = $site;
    }

    public function getSiteUserId()
    {
        return $this->_siteUserId ;
    }

    public function setSiteUserId($siteUserId)
    {
        $this->_siteUserId = $siteUserId;
    }

    public function toString()
    {

    }
}
